/* GUI CONVERTED from rwopmrp.p (converter v1.76) Mon Sep 17 22:18:41 2001 */
/* rwopmrp.p - STANDARD OPERATIONS REPORT                                     */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.7.1.4 $                                                       */
/*V8:ConvertMode=FullGUIReport                                                */
/* REVISION: 4.0    LAST MODIFIED: 03/18/88    BY: WUG  *A194*/
/* REVISION: 4.0    LAST MODIFIED: 07/18/88    BY: flm  *A327*/
/* REVISION: 7.3        LAST EDIT: 02/24/93    BY: sas *G740**/
/* REVISION: 8.5    LAST MODIFIED: 07/29/96    BY: *J12T* Sue Poland          */
/* REVISION: 8.6    LAST MODIFIED: 10/15/97    BY: bvm  *K109*/

/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb                */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* Revision: 1.7.1.3     BY: Hualin Zhong   DATE: 05/04/01 ECO: *N0YC*        */
/* $Revision: 1.7.1.4 $    BY: Manjusha Inglay  DATE: 08/28/01  ECO: *P01R*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/
/* Note: Changes made here may be necessary in fsopmrp.p also. */

/* DISPLAY TITLE */

/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rwopmrp_p_2 "Machine"
/* MaxLen: Comment: */

&SCOPED-DEFINE rwopmrp_p_3 "Print Comments"
/* MaxLen: Comment: */

&SCOPED-DEFINE rwopmrp_p_4 "Run Rate"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

define variable std_op like opm_std_op.
define variable std_op1 like opm_std_op.
define variable run_rate as decimal format "->>,>>>,>>9.99" label {&rwopmrp_p_4}.
define variable printcmmt like mfc_logical initial yes label {&rwopmrp_p_3}.
define variable i as integer.


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
std_op         colon 20
   std_op1        label {t001.i} colon 49 skip(1)
   printcmmt      colon 20
 SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER.
 F-a-title = &IF (DEFINED(SELECTION_CRITERIA) = 0)
  &THEN " Selection Criteria "
  &ELSE {&SELECTION_CRITERIA}
  &ENDIF .
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame a =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame a + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5. /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

{wbrp01.i}


/*GUI*/ {mfguirpa.i true "printer" 132 " " " " " "  }

/*GUI repeat : */
/*GUI*/ procedure p-enable-ui:


   if std_op1 = hi_char then std_op1 = "".

   if c-application-mode <> 'web' then
      
run p-action-fields (input "display").
run p-action-fields (input "enable").
end procedure. /* p-enable-ui, replacement of Data-Entry GUI*/

/*GUI*/ procedure p-report-quote:


   {wbrp06.i &command = update &fields = "  std_op std_op1 printcmmt" &frm = "a"}

   if (c-application-mode <> 'web') or
      (c-application-mode = 'web' and
      (c-web-request begins 'data')) then do:

      /* CREATE BATCH INPUT STRING */
      bcdparm = "".
      {mfquoter.i std_op }
      {mfquoter.i std_op1}
      {mfquoter.i printcmmt}

      if std_op1 = "" then std_op1 = hi_char.

   end.

   /* OUTPUT DESTINATION SELECTION */
   
/*GUI*/ end procedure. /* p-report-quote */
/*GUI - Field Trigger Section */

/*GUI MFSELxxx removed*/
/*GUI*/ procedure p-report:
/*GUI*/   {gpprtrpa.i "printer" 132 " " " " " " " " }
/*GUI*/   mainloop: do on error undo, return error on endkey undo, return error:



   {mfphead.i}

   for each opm_mstr no-lock
         where opm_std_op >= std_op and opm_std_op <= std_op1
      with frame b width 132 no-attr-space:

      if opm_fsm_type <> " " then next.

      run_rate = 0.
      if opm_run <> 0 then run_rate = 1 / opm_run.

      /* SET EXTERNAL LABELS */
      setFrameLabels(frame b:handle).
      display
         opm_std_op
         opm_desc
         opm_wkctr
         opm_mch column-label {&rwopmrp_p_2}
         opm_setup
         opm_run
         run_rate
         opm_move
         opm_yld_pct
         opm_tool
         opm_vend WITH STREAM-IO /*GUI*/ .

      if printcmmt then do:
         for each cmt_det where cmt_indx = opm_cmtindx no-lock:
            do i = 1 to 15:
               if cmt_cmmt[i] <> "" then do:
                  if page-size - line-counter < 1 then do with frame b:
                     page.
                     display
                        opm_std_op
                        dynamic-function('getTermLabelFillCentered' in h-label,
                            input "CONTINUE",
                            input 20,
                            input '*') @ opm_desc
                        "" @ opm_wkctr
                        "" @ opm_mch
                        "" @ opm_setup
                        "" @ opm_run
                        "" @ run_rate
                        "" @ opm_move
                        "" @ opm_yld_pct
                        "" @ opm_tool
                        "" @ opm_vend WITH STREAM-IO /*GUI*/ .
                  end.
                  put cmt_cmmt[i] at 15 skip.
               end.
            end.
            put skip(1).
         end.
      end.  /* if printcmmt */

      
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


   end.    /* for each opm_mstr */

   /* REPORT TRAILER  */
   
/*GUI*/ {mfguitrl.i} /*Replace mfrtrail*/

/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/


end.   /* repeat */

{wbrp04.i &frame-spec = a}

/*GUI*/ end procedure. /*p-report*/
/*GUI*/ {mfguirpb.i &flds=" std_op std_op1 printcmmt "} /*Drive the Report*/
